package com.onpositive.dataminer.rcp;

import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.IContributionItem;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.action.MenuManager;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.actions.ContributionItemFactory;
import org.eclipse.ui.application.ActionBarAdvisor;
import org.eclipse.ui.application.IActionBarConfigurer;

public class ApplicationActionBarAdvisor extends ActionBarAdvisor {

    private IContributionItem views;

	public ApplicationActionBarAdvisor(IActionBarConfigurer configurer) {
        super(configurer);
    }

    protected void makeActions(IWorkbenchWindow window) {
    	views = ContributionItemFactory.VIEWS_SHORTLIST.create(window);
    }

    protected void fillMenuBar(IMenuManager menuBar) {
    	Action action = new Action(){
    		@Override
    		public void run() {
    			// TODO Auto-generated method stub
    			super.run();
    		}
    	};
    	action.setText("Exit");
    	Action action1 = new Action(){
    		@Override
    		public void run() {
    			// TODO Auto-generated method stub
    			super.run();
    		}
    	};
    	action1.setText("Generate packed data");
    	Action action2 = new Action(){
    		@Override
    		public void run() {
    			// TODO Auto-generated method stub
    			super.run();
    		}
    	};
    	action2.setText("Settings");
		menuBar.add(action);
		menuBar.add(action1);
		menuBar.add(action2);
		MenuManager window=new MenuManager("Show View");
		window.add(views);
		menuBar.add(window);
    }
    
}
